Import('env')
import glob

subst = {'arch': env['ARCH']}

objects = Split('main.c acl_common.c clock.c cmn_err.c condvar.c flock.c fs_subr.c kcf_random.c kmem.c kobj.c kobj_subr.c kstat.c move.c mutex.c pathname.c policy.c refstr.c rwlock.c sid.c strlcpy.c taskq.c thread.c u8_textprep.c vfs.c vnode.c zmod.c callb.c')
objects += glob.glob('%(arch)s/atomic.[cS]' % subst)
cpppath = Split('. ./include ./include/%(arch)s #lib/libumem/include #lib/libavl/include #lib/libzfscommon/include' % subst)
ccflags = Split('-D_KERNEL')

env.StaticLibrary('libsolkerncompat', objects, CPPPATH = env['CPPPATH'] + cpppath, CCFLAGS = env['CCFLAGS'] + ccflags)
